package com.gaojinqi.base.common.model;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * 通用树结构实体父类
 *
 * @author gaojinqi
 * @version 1.0
 * @since 2020年04月20日
 */
@Data
@MappedSuperclass
public abstract class BaseTreeEntity<ID> extends BaseEntity {

    @Column(columnDefinition = "varchar(32)  COMMENT '父级权限ID'")
    protected ID parentId;

    @Column(columnDefinition = "varchar(255)  COMMENT '父级权限ID路径'")
    protected String parentIds;

    public abstract ID getId();

    public abstract void setId(ID id);


}
